package com.qf.fmall2202.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.fmall2202.product.entity.ProductParams;
import com.qf.fmall2202.product.dao.ProductParamsDao;
import com.qf.fmall2202.product.service.ProductParamsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.fmall2202.vo.ResultVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 商品参数  服务实现类
 * </p>
 *
 * @author 徐英海
 * @since 2022-11-07
 */
@Service
public class ProductParamsServiceImpl extends ServiceImpl<ProductParamsDao, ProductParams> implements ProductParamsService {
    @Transactional(propagation = Propagation.SUPPORTS)
    @Override
    public ResultVo queryDetailParams(String productId) {
        ProductParams productParams = this.getOne(new LambdaQueryWrapper<ProductParams>().eq(ProductParams::getProductId, productId));
        return ResultVo.ok("查询成功", productParams);
    }
}
